<?php
/**
 * Loop Blog
 * The main template file for display portfolio page.
 * Author : THEMECENTER
 * @package WordPress
*/
wp_enqueue_script('prettyPhoto');
$num=0;
?>
<div class="right-inner">
<div class="home-blog">
<?php
if(have_posts()):
while(have_posts()) : the_post();
$num++;

$imagethumb = '';
$image_fullwidth ='';


if(has_post_thumbnail())
{
$imageid=get_post_thumbnail_id(get_the_ID());
$imagethumb = wp_get_attachment_image_src($imageid,'size-194-148');
$image_fullwidth = wp_get_attachment_image_src($imageid,'size-194-148');
}
?>
<!-- About Content Start -->
			   
                    <div class="blog-shadow">
                        <div id="post-<?php the_ID(); ?>" <?php post_class("blog-img"); ?>>
                            <img src="<?php echo get_stylesheet_directory_uri(); ?>/timthumb.php?src=<?php echo $imagethumb[0]; ?>&amp;h=148&amp;w=194&amp;zc=1" alt="<?php the_title()?>" />
                            
                            <?php
    						 $blog_enable_time = get_theme_option('blog','blog_enable_time');
    						 if($blog_enable_time == true) :
    						?>
  						 
							<div class="blog-date">
                                <?php echo get_the_time('M'); ?> / <?php echo get_the_time('d'); ?>
                            </div>
							<?php endif; ?>
                            
                        </div>
                        <h2><?php the_title(); ?></h2>
                        <?php
                  			$exceptlength= get_theme_option('blog','blog_except_length'); 
                  		?>
                        <p>
                  		   <?php echo tt_substr(get_the_excerpt(),$exceptlength);?>
                        
                  		<?php 
                  			$readmore = get_theme_option('blog','blog_readmore_link');
                  			if($readmore <> '') : 
                  		?>
                  
                              			<div class="readmore"><a  class="rm-link" href="<?php the_permalink();?>"><?php echo $readmore;?></a></div>
						</p>
                  		<?php 
                  			endif;
                  		?>
						
                    </div>	
				<?php if($num % 3 == 0)
				{	
                echo '<div class="clearfix"></div>';
				}
endwhile;
endif;
if($num % 3 <> 0)
				{	
                echo '<div class="clearfix"></div>';
				}
?>
</div>
</div>
<?php			
tt_pagination();	
?>
				 
